package cn.ronghui.project.types.enums;

import lombok.Getter;

@Getter
public enum RoomTypeEnumVO {
    SINGLE("single","单人间"),
    DOUBLE("double","双人间"),
    FOUR("four","四人间"),
    ;

    private String code;
    private String info;

    RoomTypeEnumVO(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public static RoomTypeEnumVO getRoomStatusEnumVO(String value) {
        switch (value){
            case "单人间":
                return RoomTypeEnumVO.SINGLE;
            case "双人间":
                return RoomTypeEnumVO.DOUBLE;
            case "四人间":
                return RoomTypeEnumVO.FOUR;
            default:
                throw new RuntimeException("参数错误");

        }

    }
}
